<template>
  <!-- 植物信息 -->
  <el-collapse v-model="activeNames" @change="handleChange">
    <el-collapse-item title="植物信息" name="1">
      <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="名称">
          <el-input v-model="form.commonName"></el-input>
        </el-form-item>
        <el-form-item label="学名">
          <el-input v-model="form.scientificName"></el-input>
        </el-form-item>
        <el-form-item label="科目名称">
          <div class="block">
            <el-cascader v-model="value" :options="options" :props="{ expandTrigger: 'hover' }"
                         @change="handleChange"></el-cascader>
          </div>
        </el-form-item>
        <el-form-item label="描述">
          <el-input type="textarea" v-model="form.description"></el-input>
        </el-form-item>
        <el-form-item label="更新时间">
          <el-col :span="8">
            <el-date-picker type="date" placeholder="选择日期" v-model="form.lastUpdated"
                            style="width: 90%;"></el-date-picker>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="8">
            <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 90%;"></el-time-picker>
          </el-col>
        </el-form-item>
        <!-- <el-form-item>
          <el-button type="primary" @click="onSubmit">立即创建</el-button>
          <el-button>取消</el-button>
        </el-form-item> -->
      </el-form>
    </el-collapse-item>
  </el-collapse>

  <!--  -->
</template>
<script>
export default {
  name: "AlterDetails",
  data() {
    return {
      value: [],
      options: [{
        value: 'zhinan',
        label: '指南',
        children: [{
          value: 'shejiyuanze',
          label: '设计原则',
        }]
      }],
      form: {}
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!');
    }
  }
}
</script>